<!DOCTYPE html>
<!--
@author 刘鑫鑫
@date 2019/6/5
-->
<html>
<head>
    <meta charset="UTF-8">
    <title>仓库管理</title>
    <link rel="stylesheet" type="text/css" href="ui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="ui/themes/icon.css">
    <script type="text/javascript" src="ui/jquery.min.js"></script>
    <script type="text/javascript" src="ui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="ui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="ui/jquery.serializejson.min.js"></script>
    <script type="text/javascript" src="js/crud.js"></script>
    <script type="text/javascript" src="ui/download.js"></script>
    <script type="text/javascript">
        var name = "/erp/store";
        var columns = [[
            {field: 'uuid', title: '编号', width: 100},
            {field: 'name', title: '名称', width: 100},
            {field: 'address', title: '地址', width: 100},
            {
                field: 'emp', title: '仓库管理员', width: 100, formatter: function (value) {
                    return value ? value.name : '';
                    //return value.name;
                }
            },

            {
                field: '-', title: '操作', width: 200, formatter: function (value, row, index) {
                    var oper = "<a href=\"javascript:void(0)\" onclick=\"edit(" + row.uuid + ')">修改</a>';
                    oper += ' <a href="javascript:void(0)" onclick="del(' + row.uuid + ')">删除</a>';
                    return oper;
                }
            }
        ]];

    </script>
</head>
<body>
<div class="easyui-panel" style="padding-left:4px;border-bottom:0px;">
    <div style="height:2px;"></div>
    <form id="searchForm">
        名称：<input name="name">
        地址：<input name="address">
        库管员：<input name="ename" class="easyui-combobox" data-options="
					url:'erp/emp/findAll', textField:'name', valueField:'name'">

        <button type="button" id="btnSearch">查询</button>
        <button type="button" id="clearbtn">清空</button>
    </form>
    <div style="height:2px;"></div>
</div>
<table id="grid"></table>

<div id="editDlg">
    <form id="editForm">
        <input name="uuid" type="hidden">

        <table>
            <tr>
                <td>名称</td>
                <td><input name="name"></td>
            </tr>
            <tr>
                <td>地址</td>
                <td><input name="address"></td>
            </tr>
            <tr>
                <td>库管员</td>
                <td><input name="ename" class="easyui-combobox" data-options="
					url:'erp/emp/findAll', textField:'name', valueField:'name'">
                </td>
            </tr>

        </table>
        <button id="btnSave" type="button">保存</button>
    </form>
</div>

<script>
	$(".easyui-combobox").combobox({editable:false});
</script>

</body>
</html>
